home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Text / Edit / Vim / doc / index < prev    next >
Text File  |  1994-08-09  |  12KB  |  313 lines

  1. index of vim commands for
  2.  1. insert mode
  3.  2. VI commands (normal mode)
  4.  3. command line editing
  5.  4. EX commands
  6.  
  7. (for an overview of options see the end of reference.doc)
  8.  
  9. 1. INSERT MODE
  10. ==============
  11.  
  12. char        action
  13. -----------------------------------------------------------------------
  14. ^@        insert previously inserted text and stop insert {vi: up to 128
  15.         chars}
  16. ^A        insert previously inserted text {not in Vi}
  17. ^B        toggle 'revins' option.
  18. ^C        quit insert mode, without checking for abbreviation.
  19. ^D        delete one shiftwidth of indent in the current line {vi: 
  20.         only after auto-indent}
  21.         when preceded with <0> or <^>, delete all indent, with <^>
  22.         restore it in the next line
  23. ^E        insert the character which is below the cursor
  24. ^H <BS>        delete character before the cursor {vi: does not cross lines,
  25.         does not delete autoindents}
  26. ^J <LF>        begin new line
  27. ^K {char1} {char2} enter digraph (only when compiled with it) {vi: no digraphs}
  28. ^M <CR>        begin new line
  29. ^N        find next match for keyword in front of the cursor
  30. ^O        execute a single command and return to insert mode
  31. ^P        find previous match for keyword in front of the cursor
  32. ^R <0-9a-z"%:>    insert contents of register <0-9a-z"%:> {not in vi}
  33. ^T        insert one shiftwidth of indent in current line {vi: only in 
  34.         autoindent}
  35. ^U        delete all entered characters in the current line
  36. ^V        insert next non-digit literally, insert three digit decimal 
  37.         number as a single byte.
  38. ^W        delete word before the cursor
  39. ^Y        insert the character which is above the cursor
  40. ^[ <ESC>    end insert mode
  41. <DEL>        same as ^H <BS>
  42. <C_UP>        cursor one line up
  43. <C_DOWN>    cursor one line down
  44. <C_LEFT>    cursor one character left
  45. <C_RIGHT>    cursor one character right
  46. <SC_UP>        one screenfull backward
  47. <SC_DOWN>    one screenfull forward
  48. <SC_LEFT>    cursor one word left
  49. <SC_RIGHT>    cursor one word right
  50. {char1}<BS>{char2} enter digraph (only when compiled with it and 'digraph' 
  51.         option set) {vi: no digraphs}
  52.  
  53.  
  54. 2. VI COMMANDS
  55. ==============
  56.  
  57. CHAR means non-blank char
  58. WORD means sequences of non-blank chars
  59. N is number entered before the command
  60. <move> is a cursor movement command
  61. Nmove is the text that is moved over with a cursor movement command
  62. SECTION is a section that possibly starts with '}' instead of '{'
  63.  
  64. note: 1 = cursor movement command; 2 = can be undone/redone
  65.  
  66. char        note    vim normal mode (vi: what the unix vi does)
  67. ------------------------------------------------------------------------------
  68. ^@            error
  69. ^A        2    add N to number at/after cursor {vi: no ^A}
  70. ^B        1    scroll N screens Backwards
  71. ^C            interrupt current (search) command
  72. ^D            scroll Down N lines (default: half a screen)
  73. ^E            scroll N lines upwards (N lines Extra)
  74. ^F        1    scroll N screens Forward
  75. ^G            display current file name and position
  76. ^H <BS>        1    cursor N chars to the left
  77. ^I <TAB>    1    go to N newer entry in jump list
  78. ^J <LF>        1    cursor N lines downward
  79. ^K            error
  80. ^L            redraw screen
  81. ^M <CR>        1    cursor to the first CHAR N lines lower
  82. ^N        1    cursor N lines downward
  83. ^O        1    go to N older entry in jump list
  84. ^P        1    cursor N lines upward
  85. ^Q            error (used for xon/xoff)
  86. ^R        2    redo changes which were undone with 'u' (vi: retype
  87.             the screen)
  88. ^S            error (used for xon/xoff)
  89. ^T            jump to N older Tag in tag list
  90. ^U            scroll N lines Upwards (default: half a screen)
  91. ^V            start blockwise Visual (vi: no Visual)
  92. ^W            window commands, followed by another character (vi: not)
  93. ^X        2    subtract N from number at/after cursor {vi: no ^X}
  94. ^Y            scroll N lines downwards
  95. ^Z            suspend program (or start new shell)
  96. ^[ <ESC>        error
  97. ^\            error
  98. ^]            :ta to ident under cursor
  99. ^^            edit Nth alternate file (equivalent to :e #N)
  100. ^_            error
  101.  
  102. <SPACE>        1    cursor N chars to the right
  103. !<move><filter>        filter Nmove text through the "filter" command
  104. !!<filter>        filter N lines through the "filter" command
  105. "<a-zA-Z0-9.>        use buffer <a-zA-Z0-9.> for next delete, yank or put
  106.             (upper case to append)(<.> only works for put)
  107. #        1    search backward for the Nth occurrence of the ident under
  108.             the cursor {not in vi}
  109. $        1    cursor to the end of line N from the cursor
  110. %        1    find the next (curly/square) bracket on this line and go
  111.             to its match. With count: go to N percentage in the file.
  112. &        2    repeat last :s
  113. '<a-zA-Z>    1    cursor to the first CHAR on the line with mark <a-zA-Z>
  114. '[        1    cursor to the first CHAR on the line of the start of 
  115.             last operated text or start of putted text
  116. ']        1    cursor to the first CHAR on the line of the end of 
  117.             last operated text or end of putted text
  118. ''        1    cursor to the first CHAR of the line where the cursor was
  119.             before the latest jump.
  120. (        1    cursor N sentences backward
  121. )        1    cursor N sentences forward
  122. *        1    search forward for the Nth occurrence of the ident under
  123.             the cursor {not in vi}
  124. +        1    cursor to the first CHAR N lines lower
  125. ,        1    repeat latest f, t, F or T in opposite direction N times
  126. -        1    cursor to the first CHAR N lines higher
  127. .        2    repeat last change with count replaced by N
  128. /<pattern>    1    search forward for the Nth occurrence of <pattern>
  129. 0        1    cursor to the first char of the line
  130. 1            prepend to command to give a count
  131. 2            "
  132. 3            "
  133. 4            "
  134. 5            "
  135. 6            "
  136. 7            "
  137. 8            "
  138. 9            "
  139. :            Ex command (see below)        
  140. ;        1    repeat latest f, t, F or T N times
  141. <<move>        2    shift the Nmove lines one shiftwidth leftwards
  142. <<        2    shift N lines one shiftwidth leftwards
  143. =<move>        2    filter Nmove lines through "indent" (vi: when option
  144.             'lisp' is set autoindent Nmove lines)
  145. ==        2    filter N lines through "indent"
  146. ><move>        2    shift Nmove lines one shiftwidth rightwards
  147. >>        2    shift N lines one shiftwidth rightwards
  148. ?<pattern>    1    search backward for the Nth previous occurrence of
  149.             <pattern>
  150. @<a-z>        2    execute the contents of named buffer <a-z> N times
  151. @@        2    repeat the previous @<a-z> N times
  152. A        2    append text at the end of the line N times
  153. B        1    cursor N WORDS backward
  154. <"x>C        2    change from the cursor position to the end of the line,
  155.             and N-1 more lines [into buffer x]; synonym for c$
  156. <"x>D        2    delete the characters under the cursor until the end of
  157.             the line and N-1 more lines [into buffer x]; synonym for d$
  158. E        1    cursor forward to the end of WORD N
  159. F<char>            cursor to the Nth occurrence of <char> to the left
  160. G        1    cursor to line N, default last line
  161. H        1    cursor to line N from top of screen
  162. I        2    insert text before the first CHAR on the line N times
  163. J        2    Join N lines; default is 2
  164. K            lookup Keyword under the cursor with 'keywordprg'
  165. L        1    cursor to line N from bottom of screen
  166. M        1    cursor to middle line of screen
  167. N        1    repeat the latest '/' or '?' N times in opposite
  168.             direction
  169. O        2    begin a new line above the cursor and insert text, repeat
  170.             N times (vi: blank N screen lines)
  171. <"x>P        2    put the text [from buffer x] before the cursor N times
  172. V            start Visual mode on lines (vi: go to Ex mode)
  173. R        2    enter replace mode: overtype existing characters, repeat the
  174.             entered text N-1 times
  175. <"x>S        2    delete N lines [into buffer x] and start insert; synonym
  176.             for ^cc or 0cc, depending on autoindent
  177. T<char>        1    cursor till after Nth occurrence of <char> to the left
  178. U        2    undo all latest changes on one line (vi: while not moved
  179.             off of it)
  180.             While in Visual mode: make uppercase
  181. Q<move>        2    Join N lines and re-format them
  182. W        1    cursor N WORDS forward
  183. <"x>X        2    delete N characters before the cursor [into buffer x]
  184. <"x>Y            yank N lines [into buffer x]; synonym for yy
  185. ZZ            store current file, if modified, and exit        
  186. [[        1    cursor N sections backward
  187. []        1    cursor N SECTIONS backward
  188. [{        1    cursor N times back to unmatched '{' (vi: not)
  189. [(        1    cursor N times back to unmatched '(' (vi: not)
  190. [f            edit file name under the cursor
  191. [p        2    like "p", but adjust indent to current line
  192. \            error
  193. ]]        1    cursor N sections forward
  194. ][        1    cursor N SECTIONS forward
  195. ]}        1    cursor N times forward to unmatched '}' (vi: not)
  196. ])        1    cursor N times forward to unmatched ')' (vi: not)
  197. ]f            edit file name under the cursor
  198. ]p        2    like "P", but adjust indent to current line
  199. ^        1    cursor to the first CHAR of the line
  200. _        1    cursor to the first CHAR N - 1 lines lower
  201. `<a-zA-Z>    1    cursor to the mark <a-zA-Z>
  202. `[        1    cursor to the start of last operated text or start of 
  203.             putted text
  204. `]        1    cursor to the end of last operated text or end of 
  205.             putted text
  206. ``        1    cursor to the position before latest jump
  207. a        2    append text after the cursor N times
  208. b        1    cursor N words backward
  209. <"x>c<move>    2    delete Nmove text [into buffer x] and start insert
  210. <"x>cc        2    delete N lines [into buffer x] and start insert
  211. <"x>d<move>    2    delete Nmove text [into buffer x]
  212. <"x>dd        2    delete N lines [into buffer x]
  213. e        1    cursor forward to the end of word N
  214. f<char>        1    cursor to Nth occurrence of <char> to the right
  215. gs            goto sleep for N seconds (default 1) (vi: not)
  216. gf            edit file name under the cursor
  217. h        1    cursor N chars to the left
  218. i        2    insert text before the cursor N times
  219. j        1    cursor N lines downward
  220. k        1    cursor N lines upward
  221. l        1    cursor N chars to the right
  222. m<a-z>            set mark <a-z> at cursor position        
  223. n        1    repeat the latest '/' or '?' N times
  224. o        2    begin a new line below the cursor and insert text, repeat
  225.             N times (vi: blank N screen lines)
  226.             While Visual: cursor moves other end
  227. <"x>p        2    put the text [from buffer x] after the cursor N times
  228. v            start Visual mode with characters (vi: no Visual)
  229. r<char>        2    replace N chars by <char>
  230. <"x>s        2    (substitute) delete N characters [into buffer x] and
  231.             start insert
  232. t<char>        1    cursor till before Nth occurrence of <char> to the right
  233. u        2    undo changes (vi: only one level)
  234.             With Visual: make lowercase (vi: no Visual)
  235. q<a-zA-Z>        record typed characters into named buffer <a-zA-Z>
  236.             (upper case to append)
  237. q            stops recording (vi: no recording)
  238. w        1    cursor N words forward
  239. <"x>x        2    delete N characters under and after the cursor [into
  240.             buffer x]
  241. <"x>y<move>        yank Nmove text [into buffer x]
  242. <"x>yy            yank N lines [into buffer x]
  243. z<CR>            redraw, cursor line to top of window, first non-blank
  244. z.            redraw, cursor line to center of window, first non-blank
  245. z-            redraw, cursor line at bottom of window, first non-blank
  246. zb            redraw, cursor line at bottom of window
  247. zt            redraw, cursor line at top of window
  248. zz            redraw, cursor line at center of window
  249. {        1    cursor N paragraphs backward
  250. |        1    cursor to column N
  251. }        1    cursor N paragraphs forward
  252. ~        2    option notildeop: switch case of N characters under
  253.             cursor and move the cursor N characters to the right
  254.             (vi: no count)
  255. ~<move>            option tildeop: switch case of Nmove text (vi: no tildeop
  256.             option)
  257. <DEL>            when entering a number: remove the last digit
  258. <HELP>            show the file vim:vim.hlp page by page (vi: no help)
  259. <C_UP>        1    move cursor N lines upwards
  260. <C_DOWN>    1    move cursor N lines downwards
  261. <C_LEFT>    1    move cursor N chars to the left
  262. <C_RIGHT>    1    move cursor N chars to the right
  263. <SC_UP>        1    scroll N screens Backwards (same as ^B)
  264. <SC_DOWN>    1    scroll N screens Forwards (same as ^F)
  265. <SC_LEFT>    1    cursor N words backward (same as b)
  266. <SC_RIGHT>    1    cursor N words forward (same as w)
  267.  
  268.  
  269. 3. command line editing
  270. =======================
  271.  
  272. Get to the command line with the ':', '!', '/' or '?' commands.
  273. Normal characters are inserted at the current cursor position.
  274. (vi: can only alter last character in the line)
  275.  
  276. ^A        do filename completion on the pattern in front of the cursor
  277.         and insert all matches
  278. ^B        cursor to begin of command line
  279. ^D        list filenames that match the pattern in front of the cursor
  280. ^E        cursor to end of command line
  281. ^H        delete the character in front of the cursor
  282. ^L        do filename completion on the pattern in front of the cursor
  283.         and insert the longest common part
  284. ^N        after an <ESC> with multiple matches: go to next match
  285.         otherwise: same as <C_DOWN>
  286. ^P        after an <ESC> with multiple matches: go to previous match
  287.         otherwise: same as <C_UP>
  288. ^U        remove all characters
  289. ^V        insert next non-digit literally, insert three digit decimal 
  290.         number as a single byte. {Vi: type the CTRL-V twice to get one}
  291. ^W        delete the word in front of the cursor
  292. 'wildchar' option (default <TAB>)
  293.         do filename completion on the pattern in front of the cursor
  294. <DEL>        delete the character under the cursor
  295. <C_UP>        recall previous command line from history
  296. <C_DOWN>    recall next command line from history
  297. <C_LEFT>    cursor left
  298. <C_RIGHT>    cursor right
  299. <SC_LEFT>    cursor one word left
  300. <SC_RIGHT>    cursor one word right
  301. <SC_UP>        recall previous command line that matches pattern in front of
  302.         the cursor
  303. <SC_DOWN>    recall next command line that matches pattern in front of the
  304.         cursor
  305.  
  306.  
  307. 4. EX commands
  308. ==============
  309.  
  310. For an index of EX commands, type CTRL-D at the ex command prompt.
  311. Or look in "src/cmdtab.tab".
  312.  
  313.